home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Bin / DXUtils / Visual Studio 6.0 Wizards / DMToolWizard.awx / TEMPLATE / TOOLINTERFACE.H < prev    next >
Encoding:
C/C++ Source or Header  |  2002-12-11  |  3.0 KB  |  103 lines

  1. //------------------------------------------------------------------------------
  2. // File: $$DLL_NAME$$.h
  3. //
  4. // Desc: Custom interface for $$INTERFACE_NAME$$
  5. //
  6. // Author: $$TOOL_AUTHOR$$
  7. //
  8. // Copyright (c) Microsoft Corporation.  All rights reserved.
  9. //------------------------------------------------------------------------------
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. // TODO List: 
  13. $$IF(SUPPORT_DM_IMEDPARAM || SUPPORT_DM_DMP)
  14. //  - Define parameters for the DMTool in the _$$TOOLID_NAME$$Params struct
  15. $$ENDIF
  16. //  - Add custom interface methods if any
  17. //
  18. /////////////////////////////////////////////////////////////////////////////
  19.  
  20. #ifndef _$$TOOL_DEFINE$$_INTERFACE_
  21. #define _$$TOOL_DEFINE$$_INTERFACE_
  22.  
  23. $$IF(SUPPORT_DM_IMEDPARAM || SUPPORT_DM_DMP)
  24. ///////////////////////////////////////////////////////////////////////////////
  25. // Parameter Info
  26. // struct to hold the DMTool's Parameters
  27. typedef struct _$$TOOLID_NAME$$Params
  28. {
  29. $$IF(EMPTY_TOOL)
  30. // TODO: Define parameters for the DMTool
  31.     DWORD    dwParam1;    // NOTE: dwParam1 is provided as an example
  32. $$ELSE // Sample Tool
  33.     DWORD    dwNumber;
  34.     DWORD    dwDelay;
  35. $$ENDIF
  36.  
  37. } $$TOOLID_NAME$$Params, *LP$$TOOLID_NAME$$Params;
  38. typedef const $$TOOLID_NAME$$Params *LPC$$TOOLID_NAME$$Params;
  39. $$ENDIF
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif    /* C++ */
  44.  
  45. /* Forward Declarations */ 
  46. #ifdef __cplusplus
  47. typedef class $$CLASS_NAME$$ $$CLASS_NAME$$;
  48. #else
  49. typedef struct $$CLASS_NAME$$ $$CLASS_NAME$$;
  50. #endif /* __cplusplus */
  51.  
  52. $$IF(SUPPORT_DM_DMP)
  53. #ifdef __cplusplus
  54. typedef class $$CLASS_NAME$$Prop $$CLASS_NAME$$Prop;
  55. #else
  56. typedef struct $$CLASS_NAME$$Prop $$CLASS_NAME$$Prop;
  57. #endif /* __cplusplus */
  58. $$ENDIF
  59.  
  60. interface $$INTERFACE_NAME$$;
  61. #ifndef __cplusplus 
  62. typedef interface $$INTERFACE_NAME$$ $$INTERFACE_NAME$$;
  63. #endif    /* C++ */
  64.  
  65. /* Interface Definition */
  66. #undef  INTERFACE
  67. #define INTERFACE  $$INTERFACE_NAME$$
  68. DECLARE_INTERFACE_($$INTERFACE_NAME$$, IUnknown)
  69. {
  70.     // $$INTERFACE_NAME$$ methods
  71. $$IF(SUPPORT_DM_IMEDPARAM || SUPPORT_DM_DMP)
  72.     STDMETHOD(SetAllParameters)     (THIS_ LPC$$TOOLID_NAME$$Params pc$$TOOLID_NAME$$Params) PURE;
  73.     STDMETHOD(GetAllParameters)     (THIS_ LP$$TOOLID_NAME$$Params p$$TOOLID_NAME$$Params) PURE;
  74. $$ENDIF
  75.  
  76. // TODO: Add your custom interface methods here
  77. $$IF(!EMPTY_TOOL) // Sample Tool
  78.     STDMETHOD_(void, SetEchoNum)    (DWORD dwEchoNum) PURE;        
  79.     STDMETHOD_(void, SetDelay)        (MUSIC_TIME mtDelay) PURE;
  80. $$ENDIF
  81. };
  82.  
  83. /* GUID Definition */
  84. DEFINE_GUID(CLSID_$$TOOL_DEFINE$$, $$TOOL_CLSID$$);
  85. $$IF(SUPPORT_DM_DMP)
  86. DEFINE_GUID(CLSID_$$TOOL_DEFINE$$PROP, $$TOOL_PROP_CLSID$$);
  87. $$ENDIF
  88. DEFINE_GUID(IID_$$INTERFACE_NAME$$, $$TOOL_IID$$);
  89.  
  90. #ifdef __cplusplus
  91. class DECLSPEC_UUID("$$TOOL_CLSID_UUID$$") $$TOOLID_NAME$$;
  92. $$IF(SUPPORT_DM_DMP)
  93. class DECLSPEC_UUID("$$TOOL_PROP_CLSID_UUID$$") $$TOOLID_NAME$$Prop;
  94. $$ENDIF
  95. #endif
  96.  
  97. #ifdef __cplusplus
  98. };    /* extern "C" */
  99. #endif    /* C++ */
  100.  
  101. #endif // _$$TOOL_DEFINE$$_INTERFACE_
  102.  
  103.